<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h4 class="modal-title">用户信息</h4>
</div>

<div class="modal-body">
    <form role="form" class="validator_form" action="{:url('/Index/User/user/edit')}" id="editAdminForm" method="post">
        <input type="hidden" name="id" value="{$info.id?=$info.id}">
        <div class="box-body">

            <div class="form-group">
                <label>用户名</label>
                <input type="text" name="username" class="form-control" id="username" required placeholder="用户名" value="{$info.username?=$info.username}">
            </div>
            <div class="form-group">
                <label>用户昵称</label>
                <input type="text" name="nickname" class="form-control" id="nickname" required placeholder="用户昵称" value="{$info.nickname?=$info.nickname}">
            </div>
            <div class="form-group">
                <label>用户密码</label>
                <input type="text" name="userpwd" class="form-control" id="userpwd" placeholder="不填写则不修改密码">
            </div>

            <div class="form-group">
                <label>选择角色</label>
                <select name="role_id" class="form-control" id="role_id" required>
                            <option value="">选择</option>
                            {volist name="role" id="vo" key="key"}
                            <option value="{$vo.id}" {$vo['id']==$info.role_id?'selected="selected"':''}>{$vo.name}</option>
                            {/volist}
                        </select>

            </div>


        </div>
        <div class="box-footer">
            <button type="submit" class="btn btn-primary">确认</button>
        </div>


    </form>

</div>
<script>
    $(function() {
        ajax_form_submit("editAdminForm");
    });
</script>